<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

</head>

<body>
  <div id="app">
      商品名称：{{name}}  
     <input type="button" value="-1" v-on:click="methodSub">
   数量  {{count}}
     <input type="button" value="+1" @click="methodAdd">
     <input type="text" name="ss" @input="updateValue('自定义参数',$event)" /><br>
     总价{{totalprice}}
  </div>
  <script>
      let vm = new Vue({
          el:"#app",
          data() {
              return {
                 count:0,
                 price:20,
                 totalprice:0,
                 name:""
              }
          },
          methods: {
              methodSub(e){
                  console.log(e);
                  this.count--;
                  this.totalprice = this.price * this.count;
              },
              methodAdd(e){
                  console.log(e);
                  this.count++;
                  this.totalprice = this.price * this.count;  
              },
              updateValue(e){
                  console.log(e);
                  this.name = e;
              }
          },
      });
  </script>
</body>

</html>